home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / accessibility / nsIAccessibleText.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  16KB  |  300 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIAccessibleText.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIAccessibleText_h__
  6. #define __gen_nsIAccessibleText_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. typedef PRInt32 nsAccessibleTextBoundary;
  18.  
  19. typedef PRInt32 nsAccessibleCoordType;
  20.  
  21.  
  22. /* starting interface:    nsIAccessibleText */
  23. #define NS_IACCESSIBLETEXT_IID_STR "e44d3fa6-9cb2-432a-8bdb-69d72b6ada00"
  24.  
  25. #define NS_IACCESSIBLETEXT_IID \
  26.   {0xe44d3fa6, 0x9cb2, 0x432a, \
  27.     { 0x8b, 0xdb, 0x69, 0xd7, 0x2b, 0x6a, 0xda, 0x00 }}
  28.  
  29. class NS_NO_VTABLE nsIAccessibleText : public nsISupports {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IACCESSIBLETEXT_IID)
  33.  
  34.   enum { BOUNDARY_CHAR = 0 };
  35.  
  36.   enum { BOUNDARY_WORD_START = 1 };
  37.  
  38.   enum { BOUNDARY_WORD_END = 2 };
  39.  
  40.   enum { BOUNDARY_SENTENCE_START = 3 };
  41.  
  42.   enum { BOUNDARY_SENTENCE_END = 4 };
  43.  
  44.   enum { BOUNDARY_LINE_START = 5 };
  45.  
  46.   enum { BOUNDARY_LINE_END = 6 };
  47.  
  48.   enum { BOUNDARY_ATTRIBUTE_RANGE = 7 };
  49.  
  50.   enum { COORD_TYPE_SCREEN = 0 };
  51.  
  52.   enum { COORD_TYPE_WINDOW = 1 };
  53.  
  54.   /* attribute long caretOffset; */
  55.   NS_IMETHOD GetCaretOffset(PRInt32 *aCaretOffset) = 0;
  56.   NS_IMETHOD SetCaretOffset(PRInt32 aCaretOffset) = 0;
  57.  
  58.   /* readonly attribute long characterCount; */
  59.   NS_IMETHOD GetCharacterCount(PRInt32 *aCharacterCount) = 0;
  60.  
  61.   /* readonly attribute long selectionCount; */
  62.   NS_IMETHOD GetSelectionCount(PRInt32 *aSelectionCount) = 0;
  63.  
  64.   /**
  65.       * String methods may need to return multibyte-encoded strings,
  66.       * since some locales can't be encoded using 16-bit chars.
  67.       * So the methods below might return UTF-16 strings, or they could
  68.       * return "string" values which are UTF-8.
  69.       */
  70.   /* AString getText (in long startOffset, in long endOffset); */
  71.   NS_IMETHOD GetText(PRInt32 startOffset, PRInt32 endOffset, nsAString & _retval) = 0;
  72.  
  73.   /* AString getTextAfterOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
  74.   NS_IMETHOD GetTextAfterOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) = 0;
  75.  
  76.   /* AString getTextAtOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
  77.   NS_IMETHOD GetTextAtOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) = 0;
  78.  
  79.   /* AString getTextBeforeOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
  80.   NS_IMETHOD GetTextBeforeOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) = 0;
  81.  
  82.   /**
  83.       * It would be better to return an unsigned long here,
  84.       * to allow unicode chars > 16 bits
  85.       */
  86.   /* wchar getCharacterAtOffset (in long offset); */
  87.   NS_IMETHOD GetCharacterAtOffset(PRInt32 offset, PRUnichar *_retval) = 0;
  88.  
  89.   /* nsISupports getAttributeRange (in long offset, out long rangeStartOffset, out long rangeEndOffset); */
  90.   NS_IMETHOD GetAttributeRange(PRInt32 offset, PRInt32 *rangeStartOffset, PRInt32 *rangeEndOffset, nsISupports **_retval) = 0;
  91.  
  92.   /* void getCharacterExtents (in long offset, out long x, out long y, out long width, out long height, in nsAccessibleCoordType coordType); */
  93.   NS_IMETHOD GetCharacterExtents(PRInt32 offset, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height, nsAccessibleCoordType coordType) = 0;
  94.  
  95.   /* long getOffsetAtPoint (in long x, in long y, in nsAccessibleCoordType coordType); */
  96.   NS_IMETHOD GetOffsetAtPoint(PRInt32 x, PRInt32 y, nsAccessibleCoordType coordType, PRInt32 *_retval) = 0;
  97.  
  98.   /* void getSelectionBounds (in long selectionNum, out long startOffset, out long endOffset); */
  99.   NS_IMETHOD GetSelectionBounds(PRInt32 selectionNum, PRInt32 *startOffset, PRInt32 *endOffset) = 0;
  100.  
  101.   /* void setSelectionBounds (in long selectionNum, in long startOffset, in long endOffset); */
  102.   NS_IMETHOD SetSelectionBounds(PRInt32 selectionNum, PRInt32 startOffset, PRInt32 endOffset) = 0;
  103.  
  104.   /* void addSelection (in long startOffset, in long endOffset); */
  105.   NS_IMETHOD AddSelection(PRInt32 startOffset, PRInt32 endOffset) = 0;
  106.  
  107.   /* void removeSelection (in long selectionNum); */
  108.   NS_IMETHOD RemoveSelection(PRInt32 selectionNum) = 0;
  109.  
  110. };
  111.  
  112. /* Use this macro when declaring classes that implement this interface. */
  113. #define NS_DECL_NSIACCESSIBLETEXT \
  114.   NS_IMETHOD GetCaretOffset(PRInt32 *aCaretOffset); \
  115.   NS_IMETHOD SetCaretOffset(PRInt32 aCaretOffset); \
  116.   NS_IMETHOD GetCharacterCount(PRInt32 *aCharacterCount); \
  117.   NS_IMETHOD GetSelectionCount(PRInt32 *aSelectionCount); \
  118.   NS_IMETHOD GetText(PRInt32 startOffset, PRInt32 endOffset, nsAString & _retval); \
  119.   NS_IMETHOD GetTextAfterOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval); \
  120.   NS_IMETHOD GetTextAtOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval); \
  121.   NS_IMETHOD GetTextBeforeOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval); \
  122.   NS_IMETHOD GetCharacterAtOffset(PRInt32 offset, PRUnichar *_retval); \
  123.   NS_IMETHOD GetAttributeRange(PRInt32 offset, PRInt32 *rangeStartOffset, PRInt32 *rangeEndOffset, nsISupports **_retval); \
  124.   NS_IMETHOD GetCharacterExtents(PRInt32 offset, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height, nsAccessibleCoordType coordType); \
  125.   NS_IMETHOD GetOffsetAtPoint(PRInt32 x, PRInt32 y, nsAccessibleCoordType coordType, PRInt32 *_retval); \
  126.   NS_IMETHOD GetSelectionBounds(PRInt32 selectionNum, PRInt32 *startOffset, PRInt32 *endOffset); \
  127.   NS_IMETHOD SetSelectionBounds(PRInt32 selectionNum, PRInt32 startOffset, PRInt32 endOffset); \
  128.   NS_IMETHOD AddSelection(PRInt32 startOffset, PRInt32 endOffset); \
  129.   NS_IMETHOD RemoveSelection(PRInt32 selectionNum); 
  130.  
  131. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  132. #define NS_FORWARD_NSIACCESSIBLETEXT(_to) \
  133.   NS_IMETHOD GetCaretOffset(PRInt32 *aCaretOffset) { return _to GetCaretOffset(aCaretOffset); } \
  134.   NS_IMETHOD SetCaretOffset(PRInt32 aCaretOffset) { return _to SetCaretOffset(aCaretOffset); } \
  135.   NS_IMETHOD GetCharacterCount(PRInt32 *aCharacterCount) { return _to GetCharacterCount(aCharacterCount); } \
  136.   NS_IMETHOD GetSelectionCount(PRInt32 *aSelectionCount) { return _to GetSelectionCount(aSelectionCount); } \
  137.   NS_IMETHOD GetText(PRInt32 startOffset, PRInt32 endOffset, nsAString & _retval) { return _to GetText(startOffset, endOffset, _retval); } \
  138.   NS_IMETHOD GetTextAfterOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) { return _to GetTextAfterOffset(offset, boundaryType, startOffset, endOffset, _retval); } \
  139.   NS_IMETHOD GetTextAtOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) { return _to GetTextAtOffset(offset, boundaryType, startOffset, endOffset, _retval); } \
  140.   NS_IMETHOD GetTextBeforeOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) { return _to GetTextBeforeOffset(offset, boundaryType, startOffset, endOffset, _retval); } \
  141.   NS_IMETHOD GetCharacterAtOffset(PRInt32 offset, PRUnichar *_retval) { return _to GetCharacterAtOffset(offset, _retval); } \
  142.   NS_IMETHOD GetAttributeRange(PRInt32 offset, PRInt32 *rangeStartOffset, PRInt32 *rangeEndOffset, nsISupports **_retval) { return _to GetAttributeRange(offset, rangeStartOffset, rangeEndOffset, _retval); } \
  143.   NS_IMETHOD GetCharacterExtents(PRInt32 offset, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height, nsAccessibleCoordType coordType) { return _to GetCharacterExtents(offset, x, y, width, height, coordType); } \
  144.   NS_IMETHOD GetOffsetAtPoint(PRInt32 x, PRInt32 y, nsAccessibleCoordType coordType, PRInt32 *_retval) { return _to GetOffsetAtPoint(x, y, coordType, _retval); } \
  145.   NS_IMETHOD GetSelectionBounds(PRInt32 selectionNum, PRInt32 *startOffset, PRInt32 *endOffset) { return _to GetSelectionBounds(selectionNum, startOffset, endOffset); } \
  146.   NS_IMETHOD SetSelectionBounds(PRInt32 selectionNum, PRInt32 startOffset, PRInt32 endOffset) { return _to SetSelectionBounds(selectionNum, startOffset, endOffset); } \
  147.   NS_IMETHOD AddSelection(PRInt32 startOffset, PRInt32 endOffset) { return _to AddSelection(startOffset, endOffset); } \
  148.   NS_IMETHOD RemoveSelection(PRInt32 selectionNum) { return _to RemoveSelection(selectionNum); } 
  149.  
  150. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  151. #define NS_FORWARD_SAFE_NSIACCESSIBLETEXT(_to) \
  152.   NS_IMETHOD GetCaretOffset(PRInt32 *aCaretOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCaretOffset(aCaretOffset); } \
  153.   NS_IMETHOD SetCaretOffset(PRInt32 aCaretOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCaretOffset(aCaretOffset); } \
  154.   NS_IMETHOD GetCharacterCount(PRInt32 *aCharacterCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharacterCount(aCharacterCount); } \
  155.   NS_IMETHOD GetSelectionCount(PRInt32 *aSelectionCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectionCount(aSelectionCount); } \
  156.   NS_IMETHOD GetText(PRInt32 startOffset, PRInt32 endOffset, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetText(startOffset, endOffset, _retval); } \
  157.   NS_IMETHOD GetTextAfterOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTextAfterOffset(offset, boundaryType, startOffset, endOffset, _retval); } \
  158.   NS_IMETHOD GetTextAtOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTextAtOffset(offset, boundaryType, startOffset, endOffset, _retval); } \
  159.   NS_IMETHOD GetTextBeforeOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTextBeforeOffset(offset, boundaryType, startOffset, endOffset, _retval); } \
  160.   NS_IMETHOD GetCharacterAtOffset(PRInt32 offset, PRUnichar *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharacterAtOffset(offset, _retval); } \
  161.   NS_IMETHOD GetAttributeRange(PRInt32 offset, PRInt32 *rangeStartOffset, PRInt32 *rangeEndOffset, nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeRange(offset, rangeStartOffset, rangeEndOffset, _retval); } \
  162.   NS_IMETHOD GetCharacterExtents(PRInt32 offset, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height, nsAccessibleCoordType coordType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharacterExtents(offset, x, y, width, height, coordType); } \
  163.   NS_IMETHOD GetOffsetAtPoint(PRInt32 x, PRInt32 y, nsAccessibleCoordType coordType, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOffsetAtPoint(x, y, coordType, _retval); } \
  164.   NS_IMETHOD GetSelectionBounds(PRInt32 selectionNum, PRInt32 *startOffset, PRInt32 *endOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectionBounds(selectionNum, startOffset, endOffset); } \
  165.   NS_IMETHOD SetSelectionBounds(PRInt32 selectionNum, PRInt32 startOffset, PRInt32 endOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSelectionBounds(selectionNum, startOffset, endOffset); } \
  166.   NS_IMETHOD AddSelection(PRInt32 startOffset, PRInt32 endOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddSelection(startOffset, endOffset); } \
  167.   NS_IMETHOD RemoveSelection(PRInt32 selectionNum) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveSelection(selectionNum); } 
  168.  
  169. #if 0
  170. /* Use the code below as a template for the implementation class for this interface. */
  171.  
  172. /* Header file */
  173. class nsAccessibleText : public nsIAccessibleText
  174. {
  175. public:
  176.   NS_DECL_ISUPPORTS
  177.   NS_DECL_NSIACCESSIBLETEXT
  178.  
  179.   nsAccessibleText();
  180.  
  181. private:
  182.   ~nsAccessibleText();
  183.  
  184. protected:
  185.   /* additional members */
  186. };
  187.  
  188. /* Implementation file */
  189. NS_IMPL_ISUPPORTS1(nsAccessibleText, nsIAccessibleText)
  190.  
  191. nsAccessibleText::nsAccessibleText()
  192. {
  193.   /* member initializers and constructor code */
  194. }
  195.  
  196. nsAccessibleText::~nsAccessibleText()
  197. {
  198.   /* destructor code */
  199. }
  200.  
  201. /* attribute long caretOffset; */
  202. NS_IMETHODIMP nsAccessibleText::GetCaretOffset(PRInt32 *aCaretOffset)
  203. {
  204.     return NS_ERROR_NOT_IMPLEMENTED;
  205. }
  206. NS_IMETHODIMP nsAccessibleText::SetCaretOffset(PRInt32 aCaretOffset)
  207. {
  208.     return NS_ERROR_NOT_IMPLEMENTED;
  209. }
  210.  
  211. /* readonly attribute long characterCount; */
  212. NS_IMETHODIMP nsAccessibleText::GetCharacterCount(PRInt32 *aCharacterCount)
  213. {
  214.     return NS_ERROR_NOT_IMPLEMENTED;
  215. }
  216.  
  217. /* readonly attribute long selectionCount; */
  218. NS_IMETHODIMP nsAccessibleText::GetSelectionCount(PRInt32 *aSelectionCount)
  219. {
  220.     return NS_ERROR_NOT_IMPLEMENTED;
  221. }
  222.  
  223. /* AString getText (in long startOffset, in long endOffset); */
  224. NS_IMETHODIMP nsAccessibleText::GetText(PRInt32 startOffset, PRInt32 endOffset, nsAString & _retval)
  225. {
  226.     return NS_ERROR_NOT_IMPLEMENTED;
  227. }
  228.  
  229. /* AString getTextAfterOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
  230. NS_IMETHODIMP nsAccessibleText::GetTextAfterOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval)
  231. {
  232.     return NS_ERROR_NOT_IMPLEMENTED;
  233. }
  234.  
  235. /* AString getTextAtOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
  236. NS_IMETHODIMP nsAccessibleText::GetTextAtOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval)
  237. {
  238.     return NS_ERROR_NOT_IMPLEMENTED;
  239. }
  240.  
  241. /* AString getTextBeforeOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); */
  242. NS_IMETHODIMP nsAccessibleText::GetTextBeforeOffset(PRInt32 offset, nsAccessibleTextBoundary boundaryType, PRInt32 *startOffset, PRInt32 *endOffset, nsAString & _retval)
  243. {
  244.     return NS_ERROR_NOT_IMPLEMENTED;
  245. }
  246.  
  247. /* wchar getCharacterAtOffset (in long offset); */
  248. NS_IMETHODIMP nsAccessibleText::GetCharacterAtOffset(PRInt32 offset, PRUnichar *_retval)
  249. {
  250.     return NS_ERROR_NOT_IMPLEMENTED;
  251. }
  252.  
  253. /* nsISupports getAttributeRange (in long offset, out long rangeStartOffset, out long rangeEndOffset); */
  254. NS_IMETHODIMP nsAccessibleText::GetAttributeRange(PRInt32 offset, PRInt32 *rangeStartOffset, PRInt32 *rangeEndOffset, nsISupports **_retval)
  255. {
  256.     return NS_ERROR_NOT_IMPLEMENTED;
  257. }
  258.  
  259. /* void getCharacterExtents (in long offset, out long x, out long y, out long width, out long height, in nsAccessibleCoordType coordType); */
  260. NS_IMETHODIMP nsAccessibleText::GetCharacterExtents(PRInt32 offset, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height, nsAccessibleCoordType coordType)
  261. {
  262.     return NS_ERROR_NOT_IMPLEMENTED;
  263. }
  264.  
  265. /* long getOffsetAtPoint (in long x, in long y, in nsAccessibleCoordType coordType); */
  266. NS_IMETHODIMP nsAccessibleText::GetOffsetAtPoint(PRInt32 x, PRInt32 y, nsAccessibleCoordType coordType, PRInt32 *_retval)
  267. {
  268.     return NS_ERROR_NOT_IMPLEMENTED;
  269. }
  270.  
  271. /* void getSelectionBounds (in long selectionNum, out long startOffset, out long endOffset); */
  272. NS_IMETHODIMP nsAccessibleText::GetSelectionBounds(PRInt32 selectionNum, PRInt32 *startOffset, PRInt32 *endOffset)
  273. {
  274.     return NS_ERROR_NOT_IMPLEMENTED;
  275. }
  276.  
  277. /* void setSelectionBounds (in long selectionNum, in long startOffset, in long endOffset); */
  278. NS_IMETHODIMP nsAccessibleText::SetSelectionBounds(PRInt32 selectionNum, PRInt32 startOffset, PRInt32 endOffset)
  279. {
  280.     return NS_ERROR_NOT_IMPLEMENTED;
  281. }
  282.  
  283. /* void addSelection (in long startOffset, in long endOffset); */
  284. NS_IMETHODIMP nsAccessibleText::AddSelection(PRInt32 startOffset, PRInt32 endOffset)
  285. {
  286.     return NS_ERROR_NOT_IMPLEMENTED;
  287. }
  288.  
  289. /* void removeSelection (in long selectionNum); */
  290. NS_IMETHODIMP nsAccessibleText::RemoveSelection(PRInt32 selectionNum)
  291. {
  292.     return NS_ERROR_NOT_IMPLEMENTED;
  293. }
  294.  
  295. /* End of implementation class template. */
  296. #endif
  297.  
  298.  
  299. #endif /* __gen_nsIAccessibleText_h__ */
  300.